package com.hdl.school.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

import com.hdl.school.utils.BroadcastAction;
import com.hdl.school.utils.TaskManager;

/**
 * Created by yunjian on 16/10/9.
 */
public class AlarmReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        if (BroadcastAction.ACTION_ALARM.equals(action)) {
            Log.e("AlarmReceiver", "alarm running!");
            TaskManager.getInstance().startCurrentTask();
        }
    }
}
